import request from '@/utils/request'

// 分销商账户-分页版本
export function queryDistUserList(data) {
  return request({
    url: `/dist/user/list?page=${data.pageNum}`,
    method: 'post',
    data: data
  })
}

// 分销商账户-不分页版本
export function queryDistUserAll(data) {
  return request({
    url: `/dist/user/list/all`,
    method: 'post',
    data: data
  })
}

// 添加分销商账户
export function addDistUser(data) {
  return request({
    url: `/dist/user/add`,
    method: 'post',
    data: data
  })
}

// 修改分销商账户
export function editDistUser(data) {
  return request({
    url: `/dist/user/update`,
    method: 'post',
    data: data
  })
}

// 启用/禁用
export function editDistUserStatus(data) {
  return request({
    url: `/dist/user/update/status`,
    method: 'post',
    data: data
  })
}

// 分销商账户-详情
export function queryDistUserDetail(data) {
  return request({
    url: `/dist/user/detail`,
    method: 'post',
    data: data
  })
}
